package com.model;

import cn.hutool.core.util.RandomUtil;
import com.baima46.annotion.ExcelHeader;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description 程序员统计类
 * @Author yuan cong
 * @Date 2020/12/7 0007
 */
@Data
public class CoderStat{
    @ExcelHeader(value = {"各年情况", "工作年份"}, group = "d")
    private String year;
    @ExcelHeader(value = {"各年情况", "薪水（k）"}, group = "d")
    private int salary;




    /**
     * 生成导出的数据
     * @param num
     * @return
     */
    public static List<CoderStat> getCoderStat(int num) {
        List<CoderStat> list = new ArrayList<>(num);
        for (int j = 1; j <= num; j++) {
            CoderStat coderStat = new CoderStat();
            coderStat.setYear("第"+j+"年");
            coderStat.setSalary(j*3);
            list.add(coderStat);
        }

        return list;
    }
}
